package com.zjtaixue.usersite.service;

import com.alibaba.fastjson.JSONObject;
import com.zjtaixue.usersite.domain.Teacher;
import com.zjtaixue.usersite.page.PageResult;
import com.zjtaixue.usersite.query.TeacherQueryObject;
import org.apache.poi.ss.usermodel.Workbook;

import java.io.InputStream;
import java.text.ParseException;
import java.util.List;

public interface TeacherService {
    /**
     * 教师的高级查询加分页
     *
     * @param qo
     * @return
     */
    PageResult<JSONObject> listPageResult(TeacherQueryObject qo);

    void insert(Teacher teacher);

    int deleteById(Integer id);

    void update(Teacher teacher);

    Teacher getById(Integer id);

    /**
     * 读EXCEL文件，获取教师信息集合
     */
    List<Teacher> gainInfo(InputStream is);

    /**
     * 读取Excel里面教师的信息
     *
     * @param wb
     * @return
     */
    List<Teacher> readValue(Workbook wb) throws ParseException;

    int disabledById(Integer id);

    int enableById(Integer id);
}
